package com.atguigu.spzx.model.vo.common;

import lombok.Getter;

/**
 * 封装 响应状态码和描述的映射
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200 , "SUCCESS"),
    ERROR(-1 , "服务器内部错误"),
    PARAMS_ERROR(202 , "参数格式错误"),
    CODE_ERROR(203 , "验证码错误"),
    LOGIN_STATUS_ERROR(205 , "登录状态失效"),
    ACCOUNT_ERROR(204 , "账户已停用"),
    LOGIN_ERROR(201 , "账号或密码错误"),
    FILE_UPLOAD_ERROR(301,"文件上传失败" ),
    FILE_REMOVE_ERROR( 302, "文件删除失败" ),
    NOT_EMPTY_ERROR(401,"非空节点删除失败" ),
    EXCEL_IMPORT_ERROR(501, "excel数据导入失败"),
    MOBILE_ERROR(601, "手机号格式错误"),
    SMS_SEND_ERROR(602, "短信发送失败"),
    SMS_LIMIT_ERROR(603, "请勿频繁发送短信"),
    SMS_COUNT_ERROR(604, "短信发送异常"),
    MOBILE_EXISTS_ERROR(605, "手机号码已注册"),
    USERNAME_NOT_EXISTS(606, "账号不存在"),
    PASSOWRD_ERROR(607, "密码错误"),
    ORDER_TRADE_ERROR(701, "未选中购物项"),
    ORDER_SUBMIT_ERROR(702, "订单重复提交"),
    SKU_STOCK_ERROR(703, "商品库存不足"),
    SKU_PRICE_ERROR(704, "页面数据过期"),
    ALI_PAY_ERROR(705, "订单异常"),
    ;

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code ,String message){
        this.code = code;
        this.message = message;
    }
}
